# 路由配置
from handlers import *
from handlers.admin import *


handlers = [(r'/', index.IndexHandler),
            (r'/help', index.HelpHandler),
            (r'/admin/manage', manage.ManageHandler),
            (r'/admin/manage/(\w+)', manage.ManageHandler),
            (r'/admin/manage/(\w+)/(\w+)', manage.ManageHandler),
            (r'/admin/manage/(\w+)/(\d+)/(\d+)', manage.ManageHandler),
            (r'/admin/login', user.LoginHandler),
            (r'/admin/register', user.RegisterHandler),
            (r'/admin/register/(\w+)', user.RegisterHandler),
            (r'/admin/logout', user.LogoutHandler),
            (r'/admin/interface-test', interface.InterfaceHandler),
            (r'/admin/interface-test/(\w+)', interface.InterfaceHandler),
            (r'/admin/interface-test/(\w+)/(\w+)', interface.InterfaceHandler),
            (r'/admin/interface-test/(\w+)/(\w+)/(\d+)', interface.InterfaceHandler),
            (r'/admin/interface-test/(\w+)/(\w+)/(\d+)/(\d+)', interface.InterfaceHandler),
            (r'/admin/setting', setting.SettingHandler),
            (r'/admin/setting/(\w+)', setting.SettingHandler),
            (r'/admin/setting/(\w+)/(\d+)/(\d+)', setting.SettingHandler),
            (r'/admin/setting/(\w+)/(\d+)/(\d+)/(\d+)', setting.SettingHandler),
            (r'/admin/setting/(\w+)/(\w+)', setting.SettingHandler),
            (r'/admin/profile', profile.ProfileHandler),
            (r'/admin/profile/(\w+)', profile.ProfileHandler),
            (r'/admin/plugin', plugin.PluginHandler),
            (r'/admin/plugin/(\w+)', plugin.PluginHandler),
            (r'/admin/dashboard', dashboard.DashboardHandler),
            (r'/admin/page-test', page.PageHandler),
            (r'/admin/page-test/(\w+)', page.PageHandler),
            (r'/admin/page-test/(\w+)/(\w+)', page.PageHandler),
            (r'/admin/page-test/(\w+)/(\w+)/(\d+)', page.PageHandler),
            (r'/admin/websocket/weblogs', weblogs.WeblogsHandler),
            (r'/api/login', api.LoginHandler)]
